import requests
import json


def gettigquestion():
        
    url = "https://qianfan.baidubce.com/v2/app/conversation"
    
    payload = json.dumps({
        "app_id": "1c43e1f9-ea07-4b93-8cb4-5f899d818cca"
    })
    headers = {
        'Content-Type': 'application/json',
        'X-Appbuilder-Authorization': 'Bearer bce-v3/ALTAK-ug1c5lUaGpphcjGExbAA5/48862e919cdca89c9fb0109f6619f31188aaaee2'
    }
    
    response = requests.request("POST", url, headers=headers, data=payload)

    result = json.loads(response.text)
    
    return(result['conversation_id'])

result = gettigquestion()
print(result)

